<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>APL报表查询</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta content="no-cache, no-store, must-revalidate" http-equiv="Cache-Control"/>
    <meta content="no-cache" http-equiv="Pragma"/>
    <meta content="0" http-equiv="Expires"/>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=8">
    <meta http-equiv="Expires" content="0">
    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="Cache-control" content="no-cache">
    <meta http-equiv="Cache" content="no-cache">
    <link rel="stylesheet" href="../../styles/base.css"/>
    <link rel="stylesheet" href="../../styles/common.css"/>
    <link rel="stylesheet" href="../../styles/font/iconfont.css"/>
    <link rel="stylesheet" href="../../styles/pages/tabs.css"/>
    <link rel="stylesheet" href="../../jqueryNicepage/css/layui.css"  media="all">
    <link rel="stylesheet" href="../../styles/pages/calendar.css">
    <link rel="stylesheet" href="../../styles/jquery.multiselect.css"/>
    <style>
		.datagrid .panel-body {
			overflow: hidden;
			position: relative;
		}
        .queryCondition #dd{
            left:50px;
            top:0px;
        }
        .queryCondition{
            width:100%;
            min-height:180px;
            line-height: 30px;
            margin-top: 10px;
            padding-bottom: 10px;
            height:auto;
            border-bottom:2px solid #ccc;
        }
        .queryCondition span{
            display: inline-block;
             margin-top: ;
        }
        .boxContainer {
            background: #fff;
            border:none;
            box-sizing: border-box;
            width: 100%;
            top: 5px;
            border-bottom: 0;
            left: 10px;
            height: 98%;
            /*position:relative;*/
			position:fixed
        }
        
        .ctrBtn{
			text-align: right;
			margin-top: 20px;
			margin-right:10px;
		}
        .ctrBtn button {
			display: inline-block;
			margin: 0 5px 5px 5px;
			line-height: 30px;
			padding: 0 10px;
			cursor: pointer;
		}
		.folder:hover, .clearBtn:hover, .searchSureBtn:hover, .toExcell:hover{
            color:#fff;
            background:#40E0D0;
        }
		
		a {
			color:blue
		}
        
        /**
        	newText:文本框的样式
        	newSelect:选择框的样式
        */
        .newText, .newSelect {
        	color:#666;
            height: 38px;
            width: 150px;
            padding: 0 6px;
            border: 1px solid #ccc;
            box-sizing: border-box;
            font-size: 14px;
            outline: none;
            line-height: 38px;
        }
        
         /**分类属性文本框的样式，不同的样式名称，是为了通过不同的样式封装成查询条件*/
        .classText {
       		color:#666;
            height: 38px;
            width: 150px;
            padding: 0 6px;
            border: 1px solid #ccc;
            box-sizing: border-box;
            font-size: 14px;
            outline: none;
            line-height: 38px;
        }
        
        .pro_kvs2{float: right;width: 100%; color:#666}
		.pro_kvs2 .pro_kv{float: left;width: 25%;height: 37px;line-height: 27px;margin-bottom: 5px;padding: 5px; box-sizing:border-box;}
		.pro_kvs2 .pro_k{text-align: right;float: left;width: 25%;height: 100%;line-height: 27px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;word-wrap: normal;}
        .pro_v{text-align: left;float: left;width: 70%;height: 100%;line-height: 27px;}
        .pro_d{text-align: left;float: left;width: 5%;height: 100%;line-height: 27px;}
    </style>

</head>
<body>
<div class="reverse" id='reverse'>
	<table id="demo" lay-filter="test"></table>
</div>

<script type="text/javascript" src="../../js/jquery-1.11.3.min.js"></script>
<script src="../../js/json2.js"></script>
<script src="../../js/common/publicClass.js"></script>
<script src="../../layer/layer.js" charset="utf-8"></script>
<script type="text/javascript" src="../../js/constants/calendar.js"></script>
<script type="text/javascript" src="../../js/common/utils.js"></script>
<script type="text/javascript" src="../../js/common/myAjax.js"></script>
<script language="Javascript" src="../../jqueryNicepage/js/layui.js"></script>
<script type="text/javascript" src="../../js/common/jquery-ui.min.js"></script>
<script type="text/javascript" src="../../js/common/jquery.multiselect.js"></script>
<script type="text/javascript" src="../../js/pages/dccQuery/selects.js"></script>
<script type="text/javascript" src="/Windchill/netmarkets/jsp/ext/BOMECO/tianma/materialPages/APL/APLReportQuery.js"></script>

<script type="text/javascript" src="../../laydate/laydate.js"></script>

<script>
	
	 //window.onload=function(){
	 $(window).load(function(){
		getGridPanel();
	});
	
//查询构造表格参数
function getGridPanel() {
	//var number = 'TM_Xucr';
	var materialType = getQueryString("materialType");
		
	fetchData(materialType);
}

function getQueryString(name) { 
    var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i'); 
    var r = window.location.search.substr(1).match(reg); 
    if (r != null) { 
        return unescape(r[2]); 
    } 
    return null; 
}

function fetchData(number) {
	
	layui.use('table', function(){
		var table = layui.table;
		
		table.render({
			elem: '#demo',
			height: 550,
			url:'/Windchill/app/APLController/reQueryAPL',
			/*page: true, //开启分页
			limit:5,
			limits:[5,10,20],*/
			where:{
				materialType:number
			},
			text:'暂无数据',
			//toolbar:true, //工具栏
			cols: [[ //表头
				{field: 'yName', title: '物料名称', sort: true, width:'150'},
				{field: 'yNum', title: '物料编号', sort: true, width:'150'},
				{field: 'yState', title: '物料状态', sort: true, width:'150'},
				{field: 'yView', title: '物料视图', sort: true, width:'150'},
				{field: 'yVersion', title: '物料视图', sort: true, width:'150'},
				
				{field: 'cName', title: '成品名称', sort: true, width:'150'},
				{field: 'cNum', title: '成品编码', sort: true, width:'150'},
				{field: 'cVersion', title: '成品版本', sort: true, width:'150'},
				{field: 'cView', title: '成品视图', sort: true, width:'150'},
				{field: 'cState', title: '成品状态',  sort: true, width:'150'},
				{field: 'number', title: '成品研发地', sort: true, width:'150'},
				
				{field: 'bcName', title: '半成品名称', sort: true, width:'150'},
				{field: 'bcNum', title: '半成品编码', sort: true, width:'150'},
				{field: 'bcState', title: '半成品状态', sort: true, width:'150'},
				{field: 'bcView', title: '半成品视图', sort: true, width:'150'},
				{field: 'bcVersion', title: '半成品版本', sort: true, width:'150'}
			]]
		});
	});
}
	
</script>
</body>
</html>